<!-- MES驾驶舱 -->
<template>
  <div class="app-container">
    <div class="imgDiv">
      <span>{{ times }}</span>
      <img src="../../../assets/images/board/mes.png">
    </div>
  </div>
</template>
<script>
import { timeFormatToString } from '@/utils/function'
export default {
  data() {
    return {
      times: timeFormatToString(new Date()),
      timeInterval: () => {}
    }
  },
  computed: {},
  watch: {
  },
  created() {},
  mounted() {
    this.startInterval()
  },
  beforeDestroy() {
    clearInterval(this.timeInterval)
  },
  methods: {
    startInterval() {
      this.timeInterval = setInterval(() => {
        this.times = timeFormatToString(new Date())
      }, 1000)
    }
  }
}
</script>
<style lang='scss' scoped>
.app-container{
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}
.imgDiv{
    position: relative;
    width: 100%;
    height: 100%;
  span{
    position: absolute;
    right: 50px;
    top: 15px;
    color: #23cefd;
    z-index: 9;
  }
  img{
    position: absolute;
    top:0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }
}
</style>
